baseDir:=../src
includeDir:=$(baseDir)/include/
src:=$(baseDir)/*.cpp

source:
	g++ server.cpp $(src) $(baseDir)/sds.c -o server -I $(includeDir) -g -pthread && \
	g++ client.cpp $(baseDir)/errs.cpp -o client -I $(includeDir) -g

help:
	@echo "make source"
	@echo "make help"
	@echo "make clean"

th-1:
	g++ ThreadPoolTest.cpp $(baseDir)/ThreadPool.cpp -o thtest-1 -I $(includeDir) -g -pthread

th-2:
	g++ ThreadPoolTest.cpp -o thtest-2 -I ./ -g -pthread

test:
	g++ test.cpp $(baseDir)/errs.cpp $(baseDir)/ThreadPool.cpp $(baseDir)/Socket.cpp $(baseDir)/InetAddress.cpp $(baseDir)/sds.c -o test -I $(includeDir) -g -pthread

clean:
	rm -f ./server && rm -f ./client && rm -f ./test && rm -f ./th*